package com.sunday.fangdaifu.activity.common;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sunday.common.base.BaseActivity;
import com.sunday.common.event.EventBus;
import com.sunday.common.model.ResultDO;
import com.sunday.common.utils.Constants;
import com.sunday.common.volley.Response;
import com.sunday.common.widgets.UIAlertView;
import com.sunday.fangdaifu.R;
import com.sunday.fangdaifu.activity.main.MainActivity;
import com.sunday.fangdaifu.common.ApiClient;
import com.sunday.fangdaifu.utils.CacheUtils;
import com.sunday.fangdaifu.utils.SharePerferenceUtils;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by 刘涛 on 2017/7/27.
 */

public class SettingActivity extends BaseActivity {


    @Bind(R.id.title_view)
    TextView titleView;
    @Bind(R.id.menu_clear_cash)
    TextView menuClearCash;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        ButterKnife.bind(this);
        titleView.setText("设置");
        menuClearCash.setText("清理缓存  （" + CacheUtils.getTotalCacheSize(mContext) + "）");
    }

    @OnClick({R.id.menu_clear_cash})
    void onClick(View v) {
        switch (v.getId()) {
            case R.id.menu_clear_cash:
                CacheUtils.clearAllCache(mContext);
                menuClearCash.setText("清理缓存  （" + CacheUtils.getTotalCacheSize(mContext) + "）");
                break;
        }
    }

}
